/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package connectdatabase;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author Haomaru
 */
public class DBConnect {

    public static Connection con;
    public static Connection DBConnect() throws ClassNotFoundException, SQLException {
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        String url = "jdbc:odbc:BookStoreDB";
        con = DriverManager.getConnection(url);
        return con;
    }
    
}
